package com.jie.jie.mvp;

import com.jie.jie.mvp.util.GankService;
import com.jie.jie.mvp.util.RetrofitManager;

/**
 * Created by jie on 2017/1/20.
 */

public class GetTest {
//    public static void loadData() {
//        final String type = "all";
//        final int pagesize = 10;
//        final int page = 1;
//        final GankService service = XiaohuaRetrofitManager
//                .getInstance()
//                .createService(GankService.class);
//        Observable.create(new Observable.OnSubscribe<String>() {
//            @Override
//            public void call(Subscriber<? super String> subscriber) {
//                subscriber.onNext(service.getGankData(type, pagesize, page));
//            }
//        }).subscribe(new Observer<String>() {
//            @Override
//            public void onCompleted() {
//                System.out.print("sssssssss");
//            }
//
//            @Override
//            public void onError(Throwable e) {
//                System.out.print(e);
//            }
//
//            @Override
//            public void onNext(String s) {
//                System.out.print(s);
//            }
//        });
//
//    }

    public static void main(String[] a) {
        final String type = "all";
        final int pagesize = 10;
        final int page = 1;
        final GankService service = RetrofitManager
                .getInstance()
                .createService(GankService.class);
       System.out.print(service.getGankData(type,pagesize,page));
    }
}
